import SvgIcon from './SvgIcon/Index.vue' //想要定义为全局组件
import Pagination from './Pagination/index.vue'
import BackButton from './BackButton/index.vue'

import type{App,Component} from 'vue'
 
const allGoablComponent:{ [name: string]: Component} ={SvgIcon,Pagination,BackButton};
 
export default{
 
    install(app:App){
 
        Object.keys(allGoablComponent).forEach((key:string)=>{
 
            app.component(key,allGoablComponent[key]) // 注册一个全局组件
 
        })
 
    }
 
}